<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!doctype html>
<html lang="zh-CN">
<head>
<meta content="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" name="viewport" />
<meta charset="utf-8">
<title>来存吧下载</title>
<style type="text/css">
html, body {
	padding: 0px;
	margin: 0px;
	height: 100%;
	overflow: hidden;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
}

img{
	box-sizing: border-box;
	max-width: 100%;
	height: auto;
	vertical-align: middle;
	border: 0;
}
.input_box,#btnDownload {
	position: absolute;
}
.input_box {
	border-radius: 5px 0 0 5px;
	padding: 10px 15px;
	background-color: #b3220e!important;
	width: 100%;
	box-sizing: border-box;
	position: fixed;
	bottom: 0px;
	left: 0;
}
#btnDownload {
	height: 50px;
}
.input_box input {
	border-radius: 5px;
	outline: none;
	border: none;
	padding: 0 0 0 10px;
	background-color: #fd513b!important;
	color: #fff;
	font-size: 18px;
	width:70%;
	height: 50px;
}
#errorShow {
	position: absolute;
	color: #000;
	font-size: 18px;
	font-weight: bold;
	left: 20px;
	top: -20px;
}
/* .input_box {
	border-radius: 5px 0 0 5px;
	padding: 10px 15px;
	background-color: #b3220e!important;
	width: 100%;
	box-sizing: border-box;
	position: fixed;
	bottom: 0px;
	left: 0;
	text-align: center;
} */

/* #btnDownload {
	width: 85%;
} */

.wrapper {
	display: flex;
	width: 100%;
	height: 100%;
	flex-direction: column;
}
.main {
    flex: 1;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}
</style>
</head>
<body style="background: #ef3440;">
    <div class="wrapper">
		<div class="main">
			<img src="http://laicunba.b0.upaiyun.com/lcb/activity/netease_activity_bg.jpg" />
		</div>
		<div class="input_box"><div id="errorShow"></div>
			<input type="tel" id="mobile" placeholder="" />&nbsp;<img id="btnDownload" src="img/btn-download.png" />
			<!-- <img id="btnDownload" src="img/btn-netease-download.png" /> -->
		</div>
    </div>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#btnDownload").click(function() {
				$("#errorShow").html("");
				var mobile = $("#mobile").val().trim();
				if (!mobile) {
					$("#mobile").focus();
					$("#errorShow").html("请输入手机号码");
					return;
				};
				if (!(/^1[0-9]{10}$/.test(mobile))) {
					$("#errorShow").html("请输入正确的手机号码!");
					return;
				};
				
				window.location.href = "https://h5.laicunba.com/h5/ext/download/wy01.htm";
				
				$.post("netease_download_0809_save.htm?mobile=" + mobile, '', function(data) {
					if(data.status == '0') {
						$("#mobile").focus();
						$("#errorShow").html("请输入手机号码");
					}
				}, "json");
				
			});
			
			$(".input_box input").click(function(){
				$("#errorShow").html("");
			});
			
		});
	</script>
</body>
</html>